home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_015 / okidatadump / init.asm < prev    next >
Assembly Source File  |  1992-05-06  |  2KB  |  87 lines

  1.  
  2. **** initialization for Okidata ML 92 *****************************
  3.  
  4.     SECTION        printer
  5.  
  6. *---- Included files ----------------------------------------------
  7.  
  8.     INCLUDE        "exec/types.i"
  9.     INCLUDE        "exec/nodes.i"
  10.     INCLUDE        "exec/lists.i"
  11.     INCLUDE        "exec/memory.i"
  12.     INCLUDE        "exec/ports.i"
  13.     INCLUDE        "exec/libraries.i"
  14.  
  15.     INCLUDE        "macros.i"
  16.  
  17. *---- Imported Functions ------------------------------------------
  18.  
  19.     XREF_EXE    CloseLibrary
  20.     XREF_EXE    OpenLibrary
  21.     XREF        _AbsExecBase
  22.  
  23.     XREF        _PEDData
  24.  
  25. *---- Exported Globals --------------------------------------------
  26.  
  27.     XDEF        _Init
  28.     XDEF        _Expunge
  29.     XDEF        _Open
  30.     XDEF        _Close
  31.     XDEF        _PD
  32.     XDEF        _PED
  33.     XDEF        _SysBase
  34.     XDEF        _GfxBase
  35.  
  36. *******************************************************************
  37.  
  38.     SECTION        printer,DATA
  39. _PD        DC.L    0
  40. _PED        DC.L    0
  41. _SysBase    DC.L    0
  42. _GfxBase    DC.L    0
  43.  
  44. *******************************************************************
  45.  
  46.     SECTION        printer,CODE
  47. _Init:
  48.         MOVE.L    4(A7),_PD
  49.         LEA    _PEDData(PC),A0
  50.         MOVE.L    A0,_PED
  51.         MOVE.L    A6,-(A7)
  52.         MOVE.L    _AbsExecBase,A6
  53.         MOVE.L    A6,_SysBase
  54.  
  55.         LEA    GLName(PC),A1
  56.         MOVEQ    #0,D0
  57.         CALLEXE    OpenLibrary
  58.         MOVE.L    D0,_GfxBase
  59.         BEQ    initGLErr
  60.  
  61.         MOVEQ    #0,D0
  62. pdiRts:
  63.         MOVE.L    (A7)+,A6
  64.         RTS
  65.  
  66. initGLErr:
  67.         MOVEQ    #-1,D0
  68.         BRA.S    pdiRts
  69.  
  70. GLName:
  71.         DC.B    'graphics.library'
  72.         DC.B    0
  73.         DS.W    0
  74.  
  75. *----------------------------------------------------------------
  76. _Expunge:
  77.         MOVE.L    _GfxBase,A1
  78.         LINKEXE    CloseLibrary
  79.  
  80. *----------------------------------------------------------------
  81. _Open:
  82. _Close:
  83.         MOVEQ    #0,D0
  84.         RTS
  85.         
  86.         END
  87.